<?php
/**
 * Created by PhpStorm OF yuyi.
 * User: YUYI
 * Date: 2018/5/16 0016
 * Time: 下午 5:32
 * Administrator
 */

namespace app\common\service;


use app\common\model\Articles;
use think\facade\View;

class ArticleService extends BaseService
{
    public static function getHotArticle($where = ['status'=>99],$limit = 5)
    {
        $a = new Articles();
        $hotArticles = $a->order('countComments desc')->where($where)->limit($limit)->select();
        View::share('hotArticles',$hotArticles);
    }
}